Skip to content

Fix: private league fetch failure crashes the trader. (TradeQuery.lua:157: table index is nil) (Cloudflare)#9912

Open
apYdr6uxv wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
apYdr6uxv:fix/trade-league-fallback
Open

Fix: private league fetch failure crashes the trader. (TradeQuery.lua:157: table index is nil) (Cloudflare)#9912
apYdr6uxv wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
apYdr6uxv:fix/trade-league-fallback

Conversation

@apYdr6uxv

@apYdr6uxv apYdr6uxv commented Jun 27, 2026

Copy link
Copy Markdown

Fixes #9176 .

Description of the problem being solved:

When retrieving leagues, if private leagues fetch fails, it takes down the trader, even if public leagues retrieve worked.
This fix proposes that it should instead continue , with just the public leagues it could retrieve.

Error:

In download callback: Classes/TradeQuery.lua:157: table index is nil
stack traceback:
	Classes/TradeQuery.lua:157: in function 'callback'
	Classes/TradeQuery.lua:85: in function 'callback'
	Launch.lua:319: in function <Launch.lua:318>
	[C]: in function 'PCall'
	Launch.lua:230: in function <Launch.lua:222>
v2.65.0 master
Press Enter/Escape to dismiss, or F5 to restart the application.
Press CTRL + C to copy error text.

Cause

Private leagues fetch may hit Cloudflare challenge pages.
This is not an expected response, hence the crash. (The contents will be "Enable Javascript and cookies to continue")

This may not always happen, depending on how Cloudflare feels about you. (i.e. flaky bug)
Using a VPN might make it easier to reproduce.
It crashes on Get Currencies Conversion Rates or so.

Other changes

  • flow changes: some should guard against "missing leagues" state

Steps taken to verify a working solution:

  • "works here"™
  • ran docker tests

Link to a build that showcases this PR:

n/a

Before screenshot:

n/a

After screenshot:

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in "Trade for these items" menu

1 participant